/**
 * Copyright (c) 2019 xstgongyi.org
 * All rights reserved.
 */
package org.xstgongyi.eduaid.auth;

import org.apache.shiro.crypto.hash.Md5Hash;

/**
 * @author oldcrane<br/>
 * @created 2019-05-15
 */
public class AuthHelper {

	public static String encodePassphrase(String rawPassphrase, String salt) {
		return new Md5Hash(rawPassphrase, salt, getIterations()).toBase64();
	}

	private static Integer getIterations() {
		return 1024;
	}

}
